/**
 * 
 */
package br.com.rodolfo.timesheet.controller;

import java.io.Serializable;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.ViewScoped;

import br.com.rodolfo.timesheet.entity.Cargo;
import br.com.rodolfo.timesheet.service.CargoService;

/**
 * @author rjulio
 *
 */

@ManagedBean(name="cargoController")
@ViewScoped
public class CargoController extends BaseController implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4369454549088173700L;

	@ManagedProperty("#{cargoService}")
	private CargoService cargoService;
	
	private List<Cargo> cargos;

	public CargoService getCargoService() {
		return cargoService;
	}

	public void setCargoService(CargoService cargoService) {
		this.cargoService = cargoService;
	}

	public List<Cargo> getCargos() {
		cargos = cargoService.findAll();
		return cargos;
	}

	public void setCargos(List<Cargo> cargos) {
		this.cargos = cargos;
	}


}
